/**
 * 滤纸
 */
Filter = Widget.extend({
	ctor:function(){
		this._super();
		this.init();
		this.setTag(TAG_PAPER);
	},
	init:function(){
		this.setCascadeOpacityEnabled(true);

//		var hand = new Button(this, 8, TAG_RIGHT, "#hand_right.png", this.callback);
//		hand.setPosition(cc.p(1045,480));
//		hand.setVisible(false);
//		var part = new Button(this, 11, TAG_RIGHT_PART, "#hand_right_part.png", this.callback);
//		part.setPosition(cc.p(1045,480));
//		part.setVisible(false);

		// 滤纸
		var filter = new Button(this, 10, TAG_FILTER, "#filter.png", this.callback);
		//铁粉
		var fe = new Button(filter, 10, TAG_FILTER_FE, "#deposit1.png", this.callback);
		fe.setColor(cc.color(0, 0, 0));
		fe.setOpacity(0);
		fe.setPosition(45,60);
		//硫粉
		var s = new Button(filter, 10, TAG_FILTER_S, "#deposit1.png", this.callback);
		s.setColor(cc.color(219,195,70));
		s.setOpacity(0);
		s.setPosition(55,60);
		

		this.callNext = cc.callFunc(function(){
			gg.flow.next();
		}, this);
		this.callNext.retain();
	},
	loadpoint:function(){

	},
	callback:function (p){
		var action=gg.flow.flow.action;
		var func=cc.callFunc(this.actionDone,this);
//		var hand=this.getChildByTag(TAG_RIGHT);
//		var part=this.getChildByTag(TAG_RIGHT_PART);
		switch(p.getTag()){
		case TAG_FILTER:

			break;
		default:
			break;
		}
	},
	actionDone:function(p){
		var action=gg.flow.flow.action;
		switch(p.getTag()){
		case TAG_FILTER:
			break;
		default:
			break;
		}
		gg.flow.next();
	},
	onExit:function(){
		this._super();
		this.callNext.release();
	}
})